/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.yournamehere.guice;

import com.wideplay.warp.persist.Transactional;
import com.wideplay.warp.persist.dao.Finder;
import com.wideplay.warp.persist.dao.FirstResult;
import com.wideplay.warp.persist.dao.MaxResults;
import java.io.IOException;
import java.util.List;
import org.yournamehere.model.User;

/**
 *
 * @author odpsoft
 */
public interface PersonAccess {
	@Finder(query="from User")
        @Transactional(rollbackOn=IOException.class)
	List<User> listAll();
        
        @Finder(query="from User where name=? ")
        List<User> find(String userName);
        
        @Finder(query="from User where id=?")
        User findById(Long id);
        
        
        @Finder(query="from User where name=?")
        List<User> pagedUser(String userName,@FirstResult int first,@MaxResults int max);
}
